<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="MvcContrib.FluentHtml.ModelViewPage< Universum.Model.Domain.Blogs.BlogArticle>" %>


<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server"> Universum - Add blog entry </asp:Content>
<asp:Content ID="BreadcrumbsContent" ContentPlaceHolderID="Breadcrumbs" runat="server">
<%= Html.Breadcrumb().Home().Append<BlogsController>(c=>c.Index(),"Posts from "+ ( Model!=null ? Model.Username?? "blog": "blog")).AppendText("Add blog entry").End() %>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <%= Html.ValidationSummary("Create was unsuccessful. Please correct the errors and try again.") %>

      <% using (Html.BeginForm < BlogArticleController >(controller=>controller.Create(null))){%>
			
        <fieldset>
            <legend>Add blog entry</legend>
            <p>
            <%= this.TextBox( model => model.Title).Label("Title") %>
               
                <%= this.ValidationMessage( model => model.Title, "*") %>
            </p>
            <p>
            <%= this.TextArea( model => model.Text).Label("Text") %>
               
                <%= this.ValidationMessage( model => model.Text, "*") %>
            </p>
            <p>
            <%= this.TextBox( model => model.Publish).Class("date").Label("Publish") %>
               
                <%= this.ValidationMessage( model => model.Publish, "*") %>
            </p>
           
            <p>
               <%=this.SubmitButton("Create")%> or 
               <%Html.BeginLink<BlogsController>(it => it.Index()); %>
  Cancel
  <%Html.EndLink(); %>
            </p>
        </fieldset>

    <% } %>

   

</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="ScriptPlaceHolder" runat="server">
<% Html.RenderPartial("EditorAndDateUserControl"); %>
</asp:Content>
